﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="userinfo.aspx.cs" Inherits="Users_userinfo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>用户信息</title>
    <link href="../../css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div id="userinfo">
        
        <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
            BorderStyle="None" BorderWidth="0px" DataKeyNames="userid" 
            DataSourceID="SqlDataSource1" GridLines="None" HorizontalAlign="Left">
            <Fields>
                <asp:BoundField DataField="userid" HeaderText="userid" InsertVisible="False" 
                    ReadOnly="True" SortExpression="userid" Visible="False" />
                <asp:BoundField DataField="username" HeaderText="用户名：" 
                    SortExpression="username">
                    <HeaderStyle ForeColor="#FF3300" HorizontalAlign="Right" />
                </asp:BoundField>
                <asp:BoundField DataField="realname" HeaderText="姓名：" SortExpression="realname">
                    <HeaderStyle ForeColor="#FF3300" HorizontalAlign="Right" />
                </asp:BoundField>
                <asp:BoundField DataField="sex" HeaderText="性别：" SortExpression="sex">
                    <HeaderStyle ForeColor="#FF3300" HorizontalAlign="Right" />
                </asp:BoundField>
                <asp:BoundField DataField="email" HeaderText="E-mail：" SortExpression="email">
                    <HeaderStyle ForeColor="#FF3300" HorizontalAlign="Right" />
                </asp:BoundField>
                <asp:BoundField DataField="mphone" HeaderText="手机号码：" SortExpression="mphone">
                    <HeaderStyle ForeColor="#FF3300" HorizontalAlign="Right" />
                </asp:BoundField>
                <asp:BoundField DataField="phone" HeaderText="联系电话：" SortExpression="phone">
                    <HeaderStyle ForeColor="#FF3300" HorizontalAlign="Right" />
                </asp:BoundField>
                <asp:BoundField DataField="address" HeaderText="住址：" SortExpression="address">
                    <HeaderStyle ForeColor="#FF3300" HorizontalAlign="Right" />
                </asp:BoundField>
                <asp:BoundField DataField="postcode" HeaderText="邮编号码：" 
                    SortExpression="postcode">
                    <HeaderStyle ForeColor="#FF3300" HorizontalAlign="Right" />
                </asp:BoundField>
                <asp:BoundField DataField="organizationid" HeaderText="组织：" 
                    SortExpression="organizationid" Visible="False">
                    <HeaderStyle ForeColor="#FF3300" HorizontalAlign="Right" />
                </asp:BoundField>
                <asp:BoundField DataField="description" HeaderText="描述：" 
                    SortExpression="description">
                    <HeaderStyle ForeColor="#FF3300" HorizontalAlign="Right" />
                </asp:BoundField>
            </Fields>
        </asp:DetailsView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:appConnectionString %>" 
            SelectCommand="SELECT [userid], [username], [realname], [sex], [email], [mphone], [phone], [address], [postcode], [organizationid], [description] FROM [users] WHERE ([username] = @username)">
            <SelectParameters>
                <asp:SessionParameter Name="username" SessionField="username" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        
    </div>
    </form>
</body>
</html>
